function getCookie(c_name) {
	if(document.cookie.length > 0) {
		var c_star = document.cookie.indexOf(c_name+"=");
		c_star = c_star + c_name.length + 1;
		var c_end = document.cookie.indexOf(";", c_star);
		if(c_end==-1) c_end = document.cookie.length;
		return unescape(document.cookie.substring(c_star, c_end));
	}
}
//实现自动登入
window.onload = function() {
	//alert();
	var form = document.getElementById("loginform");
	var username = document.getElementById("username");
	if(getCookie("userKey") != "" && getCookie("userKey") != null && getCookie("ssid") != "" && getCookie("ssid") != null) {
		username.value = getCookie("userKey");
		form.submit();
	}
}